alter table dbo.UserExtension
add FirstName nvarchar(50) not null
alter table dbo.UserExtension
add LastName nvarchar(50) not null
alter table dbo.UserExtension
add PhoneNumber nvarchar(20) null
alter table dbo.UserExtension
add MobileNumber nvarchar(20) null

alter table dbo.UserExtension
drop constraint FK_UserExtension_Country
alter table dbo.UserExtension
drop constraint FK_UserExtension_StateProvince
alter table dbo.UserExtension
drop column CountryID
alter table dbo.UserExtension
drop column StateProvinceID

alter table dbo.Address
drop column City
alter table dbo.Address
add CityID int not null

alter table dbo.Country
alter column Published bit not null

alter table dbo.Address
add MobileNumber nvarchar(20) null

alter table dbo.Address
drop constraint FK_Address_UserExtension
alter table dbo.Address
add constraint FKAddress_User FOREIGN KEY(UserID)
references dbo.aspnet_Users(UserId)

alter table dbo.Product
add Recommend bit null

alter table dbo.ShoppingCartItem
alter column AttributesXML xml NULL

alter table dbo.ShoppingCartItem
drop constraint FK_ShoppingCart_UserSession
alter table dbo.ShoppingCartItem
drop column UserSessionGUID
alter table dbo.ShoppingCartItem
add UserID uniqueidentifier not null
alter table dbo.ShoppingCartItem
add constraint FKShoppingCartItem_User FOREIGN KEY(UserID)
references dbo.aspnet_Users(UserId)

--2010/09/08 15:03
alter table dbo.Category
add LanguageID int null
alter table dbo.Category
add constraint FKLanguage_Category foreign key(LanguageID)
references [dbo].[Language](LanguageId)
alter table dbo.Product
add LanguageID int null
alter table dbo.Category
add constraint FKLanguage_Product foreign key(LanguageID)
references [dbo].[Language](LanguageId)

alter table dbo.ProductTag
add LanguageID int null
alter table dbo.ProductTag
add constraint FKLanguage_ProductTag foreign key(LanguageID)
references [dbo].[Language](LanguageId)

alter table dbo.Language
alter column FlagImageFileName nvarchar(50) null

alter table dbo.ProductReview
drop constraint FK_ProductReview_User
alter table dbo.ProductReview
add constraint FK_ProductReview_User foreign key(UserID)
references dbo.aspnet_Users(UserId)

alter table dbo.ProductAdditionalProperty
alter column ProductID int null

alter table [dbo].[Order]
add ShippingMobileNumber nvarchar(20) null

alter table [dbo].[Order]
add ShippingCityID int null

alter table [dbo].[Product]
add ProductCode nvarchar(20) null

-- 2010/10/21
alter table [dbo].[ProductReview]
add ReplyText nvarchar(max) null

alter table [dbo].[ProductReview]
add RepliedOn datetime null

-- 2010/10/23
alter table [dbo].[Order]
drop column OrderGUID
alter table [dbo].[Order]
add OrderNumber nvarchar(13)

-- 2010/10/28 
alter table [dbo].[Order]
add Remark nvarchar(300)
alter table [dbo].[Order]
add InvoicingHeader nvarchar(50)
alter table [dbo].[Order]
add InvoicingContent nvarchar(200)

-- 2010/10/31
alter table [dbo].[Order]
add ShippingMethodID int

alter table [dbo].[OrderStatus]
add OrderStatusNumber int

-- 2010/12/12
alter table [dbo].[Product]
add CashTicketLimit money

alter table [dbo].[Order]
add DiscountLimit money

alter table Language
alter column FlagImageFileName nvarchar(50) null

alter table [dbo].[Order]
drop column AffiliateID
alter table [dbo].[Order]
add CashTicketId int null


alter table [dbo].[Product]
add DisplayOrder int null
